<template>
  <ga-drawer
    :visible="visible"
    @ok="handleOk"
    @cancel="handleCancel"
    :width="width"
    :title="title"
  >
    <slot />
  </ga-drawer>
</template>

<script setup>
import { ref } from "vue";
const props = defineProps({
  title: {
    required: true,
    default: "配置信息",
  },
  width: {
    required: true,
    default: 640,
  },
});

const visible = ref(false);
const open = () => {
  visible.value = true;
};
const emits = defineEmits(["handleCancel","handleOk"]);
defineExpose({ open,visible });
// 处理方法
const handleOk = () => {
  emits("handleOk");
};
// 处理方法
const handleCancel = () => {
 emits("handleCancel");
  visible.value = false;
};
</script>

<style lang="scss" scoped></style>
